<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
</h:head>
<h:body>
	<h:form id="form">
		<p:panel header="Marka Header Obj" id="markaPanel">
			<h:panelGrid columns="2">
				<h:outputText value="Marka Ad:" />
				<p:inputText value="#{markaGirisBean.eticMarka.ad}" />
				<p />
				<p:commandButton value="Tamam"
					action="#{markaGirisBean.markaObjEkle()}" update="datalist,markaPanel" />
			</h:panelGrid>
		</p:panel>

		<!-- p:dataList id="datalist" value="#{markaGirisBean.markaList}" var="marka">
			#{marka.ad}
		</p:dataList-->

		<p:dataTable id="datalist" var="marka"
			value="#{markaGirisBean.markaList}">
			<p:column headerText="Marka ad">
				<h:outputText value="#{marka.ad}" />
			</p:column>
			<p:column style="width:100px;text-align: center">
				<p:commandButton value="Güncelle" action="#{markaGirisBean.markaOdakla()}"
					update=":form:markaPanel">
					<f:setPropertyActionListener value="#{marka}"
						target="#{markaGirisBean.selectedMarka}" />
				</p:commandButton>
			</p:column>
			<p:column style="width:100px;text-align: center">
				<p:commandButton value="Sil" action="#{markaGirisBean.markaSil()}"
					update="datalist">
					<f:setPropertyActionListener value="#{marka}"
						target="#{markaGirisBean.selectedMarka}" />
				</p:commandButton>
			</p:column>
		</p:dataTable>
	</h:form>
</h:body>
</html>
